

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">

<%@page import="java.sql.*,java.io.*" %>
<%
Class.forName("oracle.jdbc.driver.OracleDriver");

         Connection con=DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:xe","pac","mca"); 

         
         Statement stmt=con.createStatement();
         Statement stmt1=con.createStatement();
        String question="";
        int i=0;
        String company_name="";
       String college_code="";
       String answer="";
String str=request.getParameter("student_id");
out.println(str);
ResultSet rs1=stmt1.executeQuery("select company_name,college_name from imp_stu where student_id='"+str+"'");
           
   if(rs1.next())
       {
       company_name=rs1.getString("company_name");
       college_code=rs1.getString("college_name");
 }
ResultSet rs = stmt.executeQuery("with t as(select question from imp_stu  where student_id='"+str+"')select trim(x.column_value.extract('e/text()')) question from t t, table (xmlsequence(xmltype('<e><e>' || replace(t.question,',','</e><e>')|| '</e></e>').extract('e/e'))) x ");
           
   
       %>
      

<html><body background="t5.jpg"><center>
    
<font size="5"> <form action="load.jsp">
     
         
<table height="80%" width="50%" bgcolor="white">
   
    
<tr>This is the requirement by the company <%out.println(company_name);%>
     <br> submit it as early as possible<br><td><br><br><br>
        
   
        <%  
        while(rs.next())
       {
            out.println("<tr><td>");
       question=rs.getString("question");
        out.println(question);
        out.println("</td></tr>");
   }
       %>
       <tr><td> answer:</td><td><input type="text" name="answer" /></td>
              </td></tr>
</table>
<input type="hidden" name="college_code" value="<%=college_code%>"/>
        <input type="hidden" name="student_id" value="<%=str%>"/>  
        <input type="hidden" name="company_name" value="<%=company_name%>"/>  
         <input type="hidden" name="answer" value="<%=answer%>"/> 
<input type="submit" value="send"/>




</body></html>
